package org.apache.dubbo.demo.provider;

import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.service.GenericException;
import org.apache.dubbo.rpc.service.GenericService;

/**
 * @author duyutian
 * @version 1.0
 * @date 2020/8/19 17:54
 * 这个是我的泛化调用
 */
@Service(interfaceName="org.apache.dubbo.demo.GreetingService")
public class MyGenericService implements GenericService {
    @Override
    public Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException {
        System.out.println("调用的方法为："+method);

        return "我是你爸爸" + method;
    }

    public void d1() {
        System.out.println("调用了d1");
    }

    public void d2() {
        System.out.println("调用了d2");
    }
}
